This invention relates generally to compressing color video data and, more specifically, to varying the degree of compression as a function of the color characteristics of the video data being compressed.
Color video animations or videotapes of images or scenes can be used to enhance the realism and/or usefuleness of computer generated displays and graphics. These video images are typically stored as a stream of digital color video data on a storage device such as a CD-ROM disk in a retreivable format. When desired by the viewer, or when directed by the software program, the color video data representing the video image is retrieved from the storage device and diplayed on a display device, such as a video monitor. In practice, the video data is not displayed continuously, but is divided into a series of frames. Each frame of video data comprises the necessary information to display a single sceeen, or "snapshot" of the video on the display device. Displaying a sequential series of frames in rapid succession can create the illusion of moving pictures.
The quality and realism of the displayed image is a function of the resolution of the display device and the number of colors that the display device is capable of displaying. Typically, reasonable image resolution can be achieved with a display device that displays an image where the image consists of 480 horizontal lines of 640 pixels, or picture elements, per line, although images suitable for some video games may be displayed on devices having resolutions as low as 240 horizontal lines of 320 pixels. Recently, higher resolution display devices capable of displaying 1024 lines of 1280 pixels per line have become commonly available. Where only a simple, two-tone monochrome image is desired, each pixel can be represented by a single bit of video data, since the pixel is either illuminated or dark, depending on the image. Typically, however, monochrome images are displayed using eight bits of data to represent each pixel, allowing each pixel of the image to be displayed in one of a possible 256 shades of a single color. Images displayed in color are much more exciting and visually pleasing than monochrome images, especially when used to enhance the realism of video games and simulations. Substantially more information in the form of digital video color data, however, is required to reproduce color images. In the simplest case, at least three times as much digital data must be used to define a color to be displayed by an individual pixel, since each color consists of a combination of the primary colors red, blue and green, and each of these colors must be defined by digital data. Current display devices, using the RGB (red-blue-green) format are capable of providing as many as 16,777,216 colors by using 24 bits of color video data to define each pixel.
Where relatively static images are to be displayed, the amount of color video data required is not a critical factor in the performance of the software program. However, where a video animation or moving image is desired, the video will appear jerky, unnatural and unrealistic if the video data is not displayed at a rate of at least 30 frames per second, the NTSC television standard. A single video clip lasting one minute must thus be composed of at least 1800 frames of video color data. This enormous amount of video color data must be stored on and retrieved from a CD-ROM or other device having enough storage space to hold all the video color data for the video clip.
A further problem is that storage devices such as CD-ROMs have limited data transfer rates, typically a maximum of about 600,000 bits per second. Where the data cannot be retrieved and displayed rapidly enough, the formation of the video image may stall momentarily while the color video data is being transferred from the storage device to the display device, and detracts from the the realisim of the displayed video images. In order to increase the effective speed of such storage devices and decrease the wait time for generating a moving color video display, numerous compression and decompression techniques to reduce the amount of color video data that must be stored and retrieved have been proposed. Some compression techniques divide a picture or image into a matrix of blocks, each of which is in turn divided into a matrix of picture elements or pixels. The picture or image can be converted into digital data which can then be used to generate a video display of the original picture, wherein certain information must be encoded for every pixel of every block. The amount of data required per pixel and the quality in detail of the picture that can be generated from the data are important characteristics of any compression system. In some instances, the data is compressed in a uniform manner block-by-block or frame-by-frame. In this way, m bits of compressed data are used to represent each n.times.n block of pixel data. Other systems utilize an adaptive compression method wherein color video data is examined block-by-block, and the type of compression to be used is then determined for each block. In one known system, two diverse colors for each block are determined by averaging the colors that are above and below the mean luminance for the block. These two computed colors may then be compared to a threshold value in order to determine the number of colors to be stored for the block.
What is needed in the art is a method of compressing color video data so that the recreated video image accurately reflects the colors of the original video image while reducing the amount of data necessary so as to produce moving color images in real time from storage devices having a fixed data rate. By reducing the amount of color data necessary for a frame of video, the color data for producing the image can be accessed from the storage device without lagging behind the video display.